package redis

import (
	"github.com/go-redis/redis/v7"
	"login/src/conf"
	"time"
)

var (
	expireTime = time.Hour * 1
	DB         *redis.Client
)

func Init() {
	cfg := conf.GetConf().Redis
	DB = redis.NewClient(&redis.Options{
		Addr:     cfg.Address,
		Username: cfg.Username,
		Password: cfg.Password,
		DB:       cfg.DB,
	})
}
